<script type="text/javascript">
	window.onload = function(){ 
		//Get submit button
		var submitbutton = document.getElementById("tfq");
		//Add listener to submit button
		if(submitbutton.addEventListener) {
			submitbutton.addEventListener("click", function() {
				if (submitbutton.value == 'Search'){
					submitbutton.value = '';
				}
			});
			submitbutton.addEventListener("blur", function() {
				if (submitbutton.value == '') {
					submitbutton.value = 'Search';
				}
			});
		}
	}
</script>

<div id="header-outer">
	<div id="header-inner">
		<div id="navigation"">
			<div style="clear: left;">
				<a href="<?=

$root

?>"><img src="<?=

$root

?>images/shpe-logo.png" width="160" height="64" alt="SHPE" /></a>
			</div>
			<div style="padding:24px 0;">
				<ul>
					<li id=nav-home"><a href="<?=

$root

?>">Home</a></li>
					
					<?php

if (!empty($_SESSION['LoggedIn']) && !empty($_SESSION['User']))
{
    // User is logged in, display "My Chapter" link.
    $myuser = unserialize($_SESSION['User']);
    $chapter = $myuser->getChapter();

?>
							<li id="nav-my-chapter"><a href="<?=

    $root

?>chapter/?id=<?=

    $chapter->getChapterId()

?>">My Chapter</a></li>
							<?php

}

?>
					
					<li id="nav-forum"><a href="<?=

$root

?>forum/">Forum</a></li>
				</ul>
                <div style="float:right;">
                    <form id="tfnewsearch" method="get" action="http://www.google.com" style="float:left;">
                        <input type="text" id="tfq" class="tftextinput2" name="q" size="21" maxlength="120" value="Search"><input type="submit" value="Go" class="tfbutton2">
                    </form>
                    <ul style="float:right;">
						<?php

if (empty($_SESSION['LoggedIn']) || empty($_SESSION['User']))
{

?>
							<li id="nav-login"><a href="<?=

    $root

?>login/">Log In</a></li>
						<?php

} else
{

?>
							<li id="nav-account"><a href="<?=

    $root

?>account/">My Account</a></li>
							<li id="nav-logout"><a href="<?=

    $root

?>logout/">Log Out</a></li>
						<?php

}

?>
                    </ul>
                </div>
			</div>
		</div>
	</div>
</div>
<div id="header-liner"></div>